<f:view xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ice="http://www.icesoft.com/icefaces/component"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:c="http://java.sun.com/jstl/core"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions">
    <ui:composition>
        <ice:form>
            <center>
                <ice:panelGroup>
                    <ice:panelCollapsible expanded="true" id="newmobileitem" toggleOnClick="false"
                                          style="width: 800px;">
                        <f:facet name="header">
                            <ice:panelGroup style="text-align: left">
                                <ice:outputText value="#{msgs['mobile.item.new.tilte']}"/>
                            </ice:panelGroup>
                        </f:facet>
                        <ice:panelGrid columns="2" columnClasses="newMobileLableColumn200,newMobileInputColumn500">
                            <ice:column>
                                <ice:panelGroup style="text-align:right">
                                    <ice:outputText value="#{msgs['mobile.item.mobile.id']}" escape="false"/><font
                                        color='red'>*</font>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value="#{mobileItemCreate.newItem.mobileItemId}"/>
                            </ice:column>
                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.alias.name']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value="#{mobileItemCreate.newItem.aliasName}"/>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.registry.id']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value="#{mobileItemCreate.newItem.registryId}"/>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.supplier']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value="#{mobileItemCreate.newItem.supplier}"/>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.autorenew']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:selectOneRadio value="#{mobileItemCreate.newItem.autoRenew}">
                                    <f:selectItem itemValue="#{true}" itemLabel="yes"/>
                                    <f:selectItem itemValue="#{false}" itemLabel="no"/>
                                </ice:selectOneRadio>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.status']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:selectOneMenu value="#{mobileItemCreate.newItem.status}">
                                    <f:selectItems value="#{mobileItemCreate.statusList}"/>
                                </ice:selectOneMenu>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.registration.date']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:selectInputDate value="#{mobileItemCreate.newItem.registrationDate}"
                                                     renderAsPopup="true" renderMonthAsDropdown="true"
                                                     renderYearAsDropdown="true"
                                                     highlightUnit="DAY_OF_WEEK" highlightValue="1,7"
                                                     highlightClass="weekend">
                                    <f:convertDateTime pattern="#{mobileItemCreate.datePattern}"
                                                       timeZone="#{mobileItemCreate.timeZone}"/>
                                </ice:selectInputDate>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.expire.date']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:selectInputDate value="#{mobileItemCreate.newItem.expireDate}" renderAsPopup="true"
                                                     renderMonthAsDropdown="true" renderYearAsDropdown="true"
                                                     highlightUnit="DAY_OF_WEEK" highlightValue="1,7"
                                                     highlightClass="weekend">
                                    <f:convertDateTime pattern="dd/MM/yyyy"/>
                                </ice:selectInputDate>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.manager']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value="#{mobileItemCreate.managerName}"
                                               readonly="true"/>
                                <ice:commandLink actionListener="#{mobileItemCreate.selectMobileItemManager}"
                                                 value="#{msgs['common.label.select']}"/>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.billing.contact']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value="#{mobileItemCreate.billingContactName}"
                                               readonly="true"/>
                                <ice:commandLink actionListener="#{mobileItemCreate.selectMobileItemBillingContact}"
                                                 value="#{msgs['common.label.select']}"/>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right">
                                    <ice:outputText value="#{msgs['mobile.item.mobile.product']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputText style="width: 250px" value=""/>
                            </ice:column>

                            <ice:column>
                                <ice:panelGroup style="text-align: right; height: 75px">
                                    <ice:outputText value="#{msgs['mobile.item.remark']}" escape="false"/>
                                </ice:panelGroup>
                            </ice:column>
                            <ice:column>
                                <ice:inputTextarea style="width: 450px; height: 80px"/>
                            </ice:column>
                        </ice:panelGrid>
                        <center>
                            <ice:panelGrid columns="2"
                                           columnClasses="newMobileLableColumn200,newMobileLableColumn200">
                                <ice:column>
                                    <ice:panelGroup style="text-align:center">
                                        <ice:commandButton value="#{msgs['common.button.cancel']}"
                                                           action="#{mobileItemCreate.newCancel}"/>
                                    </ice:panelGroup>
                                </ice:column>
                                <ice:column>
                                    <ice:panelGroup style="text-align:center">
                                        <ice:commandButton value="#{msgs['common.button.save']}"
                                                           action="#{mobileItemCreate.newSave}"/>
                                    </ice:panelGroup>
                                </ice:column>
                            </ice:panelGrid>
                        </center>
                    </ice:panelCollapsible>
                </ice:panelGroup>
            </center>
        </ice:form>
        <ui:include src="component/select_customer_popup.xhtml">
            <ui:param name="bean" value="#{mobileItemCreate}"/>
        </ui:include>
    </ui:composition>
</f:view>